#ifndef __OLED
#define __OLED

#include "stm32f10x.h"
#include "Mould.h"

#define OLED_Port 		 GPIOA
#define OLED_Pin_RES 	 GPIO_Pin_4
#define OLED_Pin_DC  	 GPIO_Pin_3
#define OLED_Pin_CS  	 GPIO_Pin_2
#define OLED_Pin_SCK 	 GPIO_Pin_5
#define OLED_Pin_MISO  GPIO_Pin_6
#define OLED_Pin_MOSI  GPIO_Pin_7

void OLED_GPIO_Init(void);
void OLED_SPI1_Init(void);
void OLED_Init(void);
void OLED_Reset(void);

uint8_t OLED_WriteByte(uint8_t byte);
uint8_t OLED_WriteCmd(uint8_t cmd);
uint8_t OLED_WriteData(uint8_t data); 

void OLED_Clean_Screen(void);
void OLED_Set_Cursor(uint8_t page, uint8_t addr);
void OLED_Show_String(uint8_t *str);
void OLED_Set_LinkState(uint8_t state);
void OLED_Set_Number(uint8_t str[2][88], uint8_t inte, uint8_t frac);
void OLED_Set_Temp(uint8_t inte, uint8_t frac);
void OLED_Set_Hump(uint8_t inte, uint8_t frac);
void OLED_Set_Smok(uint8_t inte, uint8_t frac);
void OLED_Set_Fire(uint8_t inte, uint8_t frac);

#endif
